kSetAtomicInstCallerTosses = $04; { the caller isn't keeping a copy around (for NASetAtomicInstrument) }
kSetAtomicInstCallerGuarantees = $08; { the caller guarantees a copy is around }
kSetAtomicInstInterruptSafe = $10; { dont move memory at this time (but process at next task time) }
kSetAtomicInstDontPreprocess = $80; { perform no further preprocessing because either 1)you know the instrument is digitally clean, or 2) you got it from a GetPartAtomic }
kInstrumentNamesModifiable = 1;
kInstrumentNamesBoth = 2;
{
* Structures specific to the GenericMusicComponent
kGenericMusicDoMIDI = $01; { implement normal MIDI messages for note, controllers, and program changes 0-127 }
kGenericMusicBank0 = $02; { implement instrument bank changes on controller 0 }
kGenericMusicBank32 = $04; { implement instrument bank changes on controller 32 }
kGenericMusicErsatzMIDI = $08; { construct MIDI packets, but send them to the derived component }
kGenericMusicCallKnobs = $10; { call the derived component with special knob format call }
kGenericMusicCallParts = $20; { call the derived component with special part format call }
kGenericMusicCallInstrument = $40; { call MusicDerivedSetInstrument for MusicSetInstrument calls }
kGenericMusicCallNumber = $80; { call MusicDerivedSetPartInstrumentNumber for MusicSetPartInstrumentNumber calls, & don't send any C0 or bank stuff }
kGenericMusicCallROMInstrument = $0100; { call MusicSetInstrument for MusicSetPartInstrumentNumber for "ROM" instruments, passing params from the ROMi resource }
kGenericMusicAllDefaults = $0200; { indicates that when a new instrument is recalled, all knobs are reset to DEFAULT settings. True for GS modules }
FUNCTION MusicGetDescription(mc: MusicComponent; VAR sd: SynthesizerDescription): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0004, $0001, $7000, $A82A;
{$ENDC}
FUNCTION MusicGetPart(mc: MusicComponent; part: LONGINT; VAR midiChannel: LONGINT; VAR polyphony: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $000C, $0002, $7000, $A82A;
{$ENDC}
FUNCTION MusicSetPart(mc: MusicComponent; part: LONGINT; midiChannel: LONGINT; polyphony: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $000C, $0003, $7000, $A82A;
{$ENDC}
FUNCTION MusicSetPartInstrumentNumber(mc: MusicComponent; part: LONGINT; instrumentNumber: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $0004, $7000, $A82A;
{$ENDC}
FUNCTION MusicGetPartInstrumentNumber(mc: MusicComponent; part: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0004, $0005, $7000, $A82A;
{$ENDC}
FUNCTION MusicStorePartInstrument(mc: MusicComponent; part: LONGINT; instrumentNumber: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $0006, $7000, $A82A;
{$ENDC}
FUNCTION MusicGetPartAtomicInstrument(mc: MusicComponent; part: LONGINT; VAR ai: AtomicInstrument; flags: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $000C, $0009, $7000, $A82A;
{$ENDC}
FUNCTION MusicSetPartAtomicInstrument(mc: MusicComponent; part: LONGINT; aiP: AtomicInstrumentPtr; flags: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $000C, $000A, $7000, $A82A;
{$ENDC}
{ Obsolete calls }
FUNCTION MusicGetInstrumentKnobDescriptionObsolete(mc: MusicComponent; knobIndex: LONGINT; mkd: UNIV Ptr): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $000D, $7000, $A82A;
{$ENDC}
FUNCTION MusicGetDrumKnobDescriptionObsolete(mc: MusicComponent; knobIndex: LONGINT; mkd: UNIV Ptr): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $000E, $7000, $A82A;
{$ENDC}
FUNCTION MusicGetKnobDescriptionObsolete(mc: MusicComponent; knobIndex: LONGINT; mkd: UNIV Ptr): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $000F, $7000, $A82A;
{$ENDC}
FUNCTION MusicGetPartKnob(mc: MusicComponent; part: LONGINT; knobID: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $0010, $7000, $A82A;
{$ENDC}
FUNCTION MusicSetPartKnob(mc: MusicComponent; part: LONGINT; knobID: LONGINT; knobValue: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $000C, $0011, $7000, $A82A;
{$ENDC}
FUNCTION MusicGetKnob(mc: MusicComponent; knobID: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0004, $0012, $7000, $A82A;
{$ENDC}
FUNCTION MusicSetKnob(mc: MusicComponent; knobID: LONGINT; knobValue: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $0013, $7000, $A82A;
{$ENDC}
FUNCTION MusicGetPartName(mc: MusicComponent; part: LONGINT; name: StringPtr): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $0014, $7000, $A82A;
{$ENDC}
FUNCTION MusicSetPartName(mc: MusicComponent; part: LONGINT; name: StringPtr): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $0015, $7000, $A82A;
{$ENDC}
FUNCTION MusicFindTone(mc: MusicComponent; VAR td: ToneDescription; VAR instrumentNumber: LONGINT; VAR fit: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $000C, $0016, $7000, $A82A;
{$ENDC}
FUNCTION MusicPlayNote(mc: MusicComponent; part: LONGINT; pitch: LONGINT; velocity: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $000C, $0017, $7000, $A82A;
{$ENDC}
FUNCTION MusicResetPart(mc: MusicComponent; part: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0004, $0018, $7000, $A82A;
{$ENDC}
FUNCTION MusicSetPartController(mc: MusicComponent; part: LONGINT; controllerNumber: MusicController; controllerValue: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $000C, $0019, $7000, $A82A;
{$ENDC}
FUNCTION MusicGetPartController(mc: MusicComponent; part: LONGINT; controllerNumber: MusicController): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $001A, $7000, $A82A;
{$ENDC}
FUNCTION MusicGetMIDIProc(mc: MusicComponent; VAR midiSendProc: MusicMIDISendUPP; VAR refCon: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $001B, $7000, $A82A;
{$ENDC}
FUNCTION MusicSetMIDIProc(mc: MusicComponent; midiSendProc: MusicMIDISendUPP; refCon: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $001C, $7000, $A82A;
{$ENDC}
FUNCTION MusicGetInstrumentNames(mc: MusicComponent; modifiableInstruments: LONGINT; VAR instrumentNames: Handle; VAR instrumentCategoryLasts: Handle; VAR instrumentCategoryNames: Handle): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0010, $001D, $7000, $A82A;
{$ENDC}
FUNCTION MusicGetDrumNames(mc: MusicComponent; modifiableInstruments: LONGINT; VAR instrumentNumbers: Handle; VAR instrumentNames: Handle): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $000C, $001E, $7000, $A82A;
{$ENDC}
FUNCTION MusicGetMasterTune(mc: MusicComponent): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0000, $001F, $7000, $A82A;
{$ENDC}
FUNCTION MusicSetMasterTune(mc: MusicComponent; masterTune: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0004, $0020, $7000, $A82A;
{$ENDC}
FUNCTION MusicGetInstrumentAboutInfo(mc: MusicComponent; part: LONGINT; VAR iai: InstrumentAboutInfo): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $0022, $7000, $A82A;
{$ENDC}
FUNCTION MusicGetDeviceConnection(mc: MusicComponent; index: LONGINT; VAR id1: LONGINT; VAR id2: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $000C, $0023, $7000, $A82A;
{$ENDC}
FUNCTION MusicUseDeviceConnection(mc: MusicComponent; id1: LONGINT; id2: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $0024, $7000, $A82A;
{$ENDC}
FUNCTION MusicGetKnobSettingStrings(mc: MusicComponent; knobIndex: LONGINT; isGlobal: LONGINT; VAR settingsNames: Handle; VAR settingsCategoryLasts: Handle; VAR settingsCategoryNames: Handle): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0014, $0025, $7000, $A82A;
{$ENDC}
FUNCTION MusicGetMIDIPorts(mc: MusicComponent; VAR inputPortCount: LONGINT; VAR outputPortCount: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $0026, $7000, $A82A;
{$ENDC}
FUNCTION MusicSendMIDI(mc: MusicComponent; portIndex: LONGINT; VAR mp: MusicMIDIPacket): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $0027, $7000, $A82A;
{$ENDC}
FUNCTION MusicReceiveMIDI(mc: MusicComponent; readHook: MusicMIDIReadHookUPP; refCon: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $0028, $7000, $A82A;
{$ENDC}
FUNCTION MusicStartOffline(mc: MusicComponent; VAR numChannels: LONGINT; VAR sampleRate: UnsignedFixed; VAR sampleSize: INTEGER; dataProc: MusicOfflineDataUPP; dataProcRefCon: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0014, $0029, $7000, $A82A;
{$ENDC}
FUNCTION MusicSetOfflineTimeTo(mc: MusicComponent; newTimeStamp: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0004, $002A, $7000, $A82A;
{$ENDC}
FUNCTION MusicGetInstrumentKnobDescription(mc: MusicComponent; knobIndex: LONGINT; VAR mkd: KnobDescription): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $002B, $7000, $A82A;
{$ENDC}
FUNCTION MusicGetDrumKnobDescription(mc: MusicComponent; knobIndex: LONGINT; VAR mkd: KnobDescription): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $002C, $7000, $A82A;
{$ENDC}
FUNCTION MusicGetKnobDescription(mc: MusicComponent; knobIndex: LONGINT; VAR mkd: KnobDescription): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $002D, $7000, $A82A;
{$ENDC}
FUNCTION MusicGetInfoText(mc: MusicComponent; selector: LONGINT; VAR textH: Handle; VAR styleH: Handle): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $000C, $002E, $7000, $A82A;
{$ENDC}
CONST
kGetInstrumentInfoNoBuiltIn = $01;
kGetInstrumentInfoMidiUserInst = $02;
kGetInstrumentInfoNoIText = $04;
FUNCTION MusicGetInstrumentInfo(mc: MusicComponent; getInstrumentInfoFlags: LONGINT; VAR infoListH: InstrumentInfoListHandle): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $002F, $7000, $A82A;
{$ENDC}
FUNCTION MusicTask(mc: MusicComponent): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0000, $0031, $7000, $A82A;
{$ENDC}
FUNCTION MusicSetPartInstrumentNumberInterruptSafe(mc: MusicComponent; part: LONGINT; instrumentNumber: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $0032, $7000, $A82A;
{$ENDC}
FUNCTION MusicSetPartSoundLocalization(mc: MusicComponent; part: LONGINT; data: Handle): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $0033, $7000, $A82A;
{$ENDC}
FUNCTION MusicGenericConfigure(mc: MusicComponent; mode: LONGINT; flags: LONGINT; baseResID: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $000C, $0100, $7000, $A82A;
{$ENDC}
FUNCTION MusicGenericGetPart(mc: MusicComponent; partNumber: LONGINT; VAR part: GCPartPtr): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $0101, $7000, $A82A;
{$ENDC}
FUNCTION MusicGenericGetKnobList(mc: MusicComponent; knobType: LONGINT; VAR gkdlH: GenericKnobDescriptionListHandle): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $0102, $7000, $A82A;
{$ENDC}
FUNCTION MusicDerivedMIDISend(mc: MusicComponent; VAR packet: MusicMIDIPacket): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0004, $0200, $7000, $A82A;
{$ENDC}
FUNCTION MusicDerivedSetKnob(mc: MusicComponent; knobType: LONGINT; knobNumber: LONGINT; knobValue: LONGINT; partNumber: LONGINT; VAR p: GCPart; VAR gkd: GenericKnobDescription): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0018, $0201, $7000, $A82A;
{$ENDC}
FUNCTION MusicDerivedSetPart(mc: MusicComponent; partNumber: LONGINT; VAR p: GCPart): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $0202, $7000, $A82A;
{$ENDC}
FUNCTION MusicDerivedSetInstrument(mc: MusicComponent; partNumber: LONGINT; VAR p: GCPart): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $0203, $7000, $A82A;
{$ENDC}
FUNCTION MusicDerivedSetPartInstrumentNumber(mc: MusicComponent; partNumber: LONGINT; VAR p: GCPart): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $0204, $7000, $A82A;
{$ENDC}
FUNCTION MusicDerivedSetMIDI(mc: MusicComponent; midiProc: MusicMIDISendProcPtr; refcon: LONGINT; midiChannel: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $000C, $0205, $7000, $A82A;
{$ENDC}
FUNCTION MusicDerivedStorePartInstrument(mc: MusicComponent; partNumber: LONGINT; VAR p: GCPart; instrumentNumber: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $000C, $0206, $7000, $A82A;
{$ENDC}
{ Mask bit for returned value by InstrumentFind. }
inputPortID: OSType; { terminology death: this port is used to SEND to the midi synth }
outputPortID: OSType; { terminology death: this port receives from a keyboard or other control device }
midiChannel: LONGINT; { The system channel; others are configurable (or the nubus slot number) }
flags: LONGINT;
unique: LONGINT; { unique id may be used instead of index, to getinfo and unregister calls }
reserved1: LONGINT; { should be zero }
reserved2: LONGINT; { should be zero }
END;
QTMIDIPortPtr = ^QTMIDIPort;
QTMIDIPort = RECORD
portConnections: SynthesizerConnections;
portName: Str63;
END;
CONST
kNoteRequestNoGM = 1; { dont degrade to a GM synth }
kNoteRequestNoSynthType = 2; { dont degrade to another synth of same type but different name }
kNoteRequestSynthMustMatch = 4; { synthType must be a match, including kGMSynthComponentSubType }
TYPE
NoteAllocator = ComponentInstance;
NoteRequestInfoPtr = ^NoteRequestInfo;
NoteRequestInfo = RECORD
flags: SInt8; { 1: dont accept GM match, 2: dont accept same-synth-type match }
reserved: SInt8; { must be zero }
polyphony: INTEGER; { Maximum number of voices }
typicalPolyphony: Fixed; { Hint for level mixing }
END;
NoteRequestPtr = ^NoteRequest;
NoteRequest = RECORD
info: NoteRequestInfo;
tone: ToneDescription;
END;
NoteChannel = ^LONGINT;
CONST
kPickDontMix = 1; { dont mix instruments with drum sounds }
kPickSameSynth = 2; { only allow the same device that went in, to come out }
kPickUserInsts = 4; { show user insts in addition to ROM voices }
kPickEditAllowEdit = 8; { lets user switch over to edit mode }
kPickEditAllowPick = 16; { lets the user switch over to pick mode }
kPickEditSynthGlobal = 32; { edit the global knobs of the synth }
kPickEditControllers = 64; { edit the controllers of the notechannel }
kNoteAllocatorComponentType = 'nota';
{
--------------------------------
Note Allocator Prototypes
--------------------------------
}
FUNCTION NARegisterMusicDevice(ci: NoteAllocator; synthType: OSType; VAR name: Str31; VAR connections: SynthesizerConnections): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $000C, $0000, $7000, $A82A;
{$ENDC}
FUNCTION NAUnregisterMusicDevice(ci: NoteAllocator; index: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0004, $0001, $7000, $A82A;
{$ENDC}
FUNCTION NAGetRegisteredMusicDevice(ci: NoteAllocator; index: LONGINT; VAR synthType: OSType; VAR name: Str31; VAR connections: SynthesizerConnections; VAR mc: MusicComponent): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0014, $0002, $7000, $A82A;
{$ENDC}
FUNCTION NASaveMusicConfiguration(ci: NoteAllocator): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0000, $0003, $7000, $A82A;
{$ENDC}
FUNCTION NANewNoteChannel(ci: NoteAllocator; VAR noteRequest: NoteRequest; VAR outChannel: NoteChannel): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $0004, $7000, $A82A;
{$ENDC}
FUNCTION NADisposeNoteChannel(ci: NoteAllocator; noteChannel: NoteChannel): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0004, $0005, $7000, $A82A;
{$ENDC}
FUNCTION NAGetNoteChannelInfo(ci: NoteAllocator; noteChannel: NoteChannel; VAR index: LONGINT; VAR part: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $000C, $0006, $7000, $A82A;
{$ENDC}
FUNCTION NAPrerollNoteChannel(ci: NoteAllocator; noteChannel: NoteChannel): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0004, $0007, $7000, $A82A;
{$ENDC}
FUNCTION NAUnrollNoteChannel(ci: NoteAllocator; noteChannel: NoteChannel): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0004, $0008, $7000, $A82A;
{$ENDC}
FUNCTION NASetNoteChannelVolume(ci: NoteAllocator; noteChannel: NoteChannel; volume: Fixed): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $000B, $7000, $A82A;
{$ENDC}
FUNCTION NAResetNoteChannel(ci: NoteAllocator; noteChannel: NoteChannel): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0004, $000C, $7000, $A82A;
{$ENDC}
FUNCTION NAPlayNote(ci: NoteAllocator; noteChannel: NoteChannel; pitch: LONGINT; velocity: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $000C, $000D, $7000, $A82A;
{$ENDC}
FUNCTION NASetController(ci: NoteAllocator; noteChannel: NoteChannel; controllerNumber: LONGINT; controllerValue: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $000C, $000E, $7000, $A82A;
{$ENDC}
FUNCTION NASetKnob(ci: NoteAllocator; noteChannel: NoteChannel; knobNumber: LONGINT; knobValue: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $000C, $000F, $7000, $A82A;
{$ENDC}
FUNCTION NAFindNoteChannelTone(ci: NoteAllocator; noteChannel: NoteChannel; VAR td: ToneDescription; VAR instrumentNumber: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $000C, $0010, $7000, $A82A;
{$ENDC}
FUNCTION NASetInstrumentNumber(ci: NoteAllocator; noteChannel: NoteChannel; instrumentNumber: LONGINT): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $0011, $7000, $A82A;
{$ENDC}
FUNCTION NAPickInstrument(ci: NoteAllocator; filterProc: ModalFilterUPP; prompt: StringPtr; VAR sd: ToneDescription; flags: LONGINT; refCon: LONGINT; reserved1: LONGINT; reserved2: LONGINT): ComponentResult;
kMarkerEventValueFieldWidth = 16; { General Events }
kGeneralEventSubtypeFieldPos = 16; { in the last long word }
kGeneralEventSubtypeFieldWidth = 14;
kGeneralEventLengthFieldPos = 0; { in the 1st & last long words }
kGeneralEventLengthFieldWidth = 16;
{ General Event Defined Types }
kGeneralEventNoteRequest = 1; { Encapsulates NoteRequest data structure }
kGeneralEventPartKey = 4;
kGeneralEventTuneDifference = 5; { Contains a standard sequence, with end marker, for the tune difference of a sequence piece (halts QuickTime 2.0 Music) }
kGeneralEventAtomicInstrument = 6; { Encapsulates AtomicInstrument record }
kGeneralEventMIDIChannel = 8; { used in tune header, one longword identifies the midi channel it originally came from }
kGeneralEventPartChange = 9; { used in tune sequence, one longword identifies the tune part which can now take over this part's note channel (similar to program change) (halts QuickTime 2.0 Music) }
kGeneralEventNoOp = 10; { guaranteed to do nothing and be ignored. (halts QuickTime 2.0 Music) }
kGeneralEventUsedNotes = 11; { four longwords specifying which midi notes are actually used, 0..127 msb to lsb }
{ Marker Event Defined Types // marker is 60 ee vv vv in hex, where e = event type, and v = value }
kMarkerEventEnd = 0; { marker type 0 means: value 0 - stop, value != 0 - ignore }
kMarkerEventBeat = 1; { value 0 = single beat; anything else is 65536ths-of-a-beat (quarter note) }
kMarkerEventTempo = 2; { value same as beat marker, but indicates that a tempo event should be computed (based on where the next beat or tempo marker is) and emitted upon export }
{ UPP call backs }
uppMusicMIDISendProcInfo = $00000FF0;
uppMusicMIDIReadHookProcInfo = $000003F0;
uppMusicOfflineDataProcInfo = $00000FF0;
uppTuneCallBackProcInfo = $000003C0;
uppTunePlayCallBackProcInfo = $00000FC0;
FUNCTION NewMusicMIDISendProc(userRoutine: MusicMIDISendProcPtr): MusicMIDISendUPP;
{$IFC NOT GENERATINGCFM }
INLINE $2E9F;
{$ENDC}
FUNCTION NewMusicMIDIReadHookProc(userRoutine: MusicMIDIReadHookProcPtr): MusicMIDIReadHookUPP;
{$IFC NOT GENERATINGCFM }
INLINE $2E9F;
{$ENDC}
FUNCTION NewMusicOfflineDataProc(userRoutine: MusicOfflineDataProcPtr): MusicOfflineDataUPP;
{$IFC NOT GENERATINGCFM }
INLINE $2E9F;
{$ENDC}
FUNCTION NewTuneCallBackProc(userRoutine: TuneCallBackProcPtr): TuneCallBackUPP;
{$IFC NOT GENERATINGCFM }
INLINE $2E9F;
{$ENDC}
FUNCTION NewTunePlayCallBackProc(userRoutine: TunePlayCallBackProcPtr): TunePlayCallBackUPP;
{$IFC NOT GENERATINGCFM }
INLINE $2E9F;
{$ENDC}
FUNCTION CallMusicMIDISendProc(self: MusicComponent; refCon: LONGINT; VAR mmp: MusicMIDIPacket; userRoutine: MusicMIDISendUPP): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $205F, $4E90;
{$ENDC}
FUNCTION CallMusicMIDIReadHookProc(VAR mp: MusicMIDIPacket; myRefCon: LONGINT; userRoutine: MusicMIDIReadHookUPP): ComponentResult;
{$IFC NOT GENERATINGCFM}
INLINE $205F, $4E90;
{$ENDC}
FUNCTION CallMusicOfflineDataProc(SoundData: Ptr; numBytes: LONGINT; myRefCon: LONGINT; userRoutine: MusicOfflineDataUPP): ComponentResult;